package com.acme.task4;

public class Task4Arrays {
	public static void main(String[] args) {

		int array[] = new int[10];
		for (int i = 0; i < array.length; i++)
		{
			double x = Math.random();
			if (x < 0.33)
			{
				array[i] = 3;
			}
			else if (x <0.66)
			{
				array[i] = 7;
			}
			else
			{
				array[i] = 9;
			}
		}
		
		int counter[] = new int[3];
		
		for (int i = 0; i < array.length; i++)
		{
			switch (array[i])
			{
			case 3:
				counter[0]++;
				break;
			case 7:
				counter[1]++;
				break;
			case 9:
				counter[2]++;
				break;
			}
		}
		
		System.out.println("Number of 3: "+String.valueOf(counter[0]));
		System.out.println("Number of 7: "+String.valueOf(counter[1]));
		System.out.println("Number of 9: "+String.valueOf(counter[2]));
	}
}
